<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>SB Admin - Bootstrap Admin Template</title>

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="css/sb-admin.css" rel="stylesheet">

    <!-- Morris Charts CSS -->
    <link href="css/plugins/morris.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- Bmap -->
    <script src="http://api.map.baidu.com/api?v=2.0&ak=5zQ9nwYR2PShtg3XHWEFDp9yGAy1E6vb"></script>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>
<body>
<!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
    <ul class="nav navbar-nav side-nav">
        <li>
            <a class="navbar-brand" href="#"><img src="static/logo.png"></a>
        </li>
        <li>
            <a href="index.html"><i class="fa fa-fw fa-dashboard"></i> 主页</a>
        </li>
        <li class="active">
            <a href="charts.html"><i class="fa fa-fw fa-bar-chart-o"></i> 数据可视</a>
        </li>
        <li>
            <a href="tables.html"><i class="fa fa-fw fa-table"></i> 招聘/简历</a>
        </li>
        <li>
            <a href="forms.html"><i class="fa fa-fw fa-edit"></i> 餐饮行业</a>
        </li>
        <li>
            <a href="javascript:;" data-toggle="collapse" data-target="#demo"><i class="fa fa-fw fa-arrows-v"></i> 企业 <i class="fa fa-fw fa-caret-down"></i></a>
            <ul id="demo" class="collapse">
                <li>
                    <a href="#">时间轴</a>
                </li>
                <li>
                    <a href="#">风险预测</a>
                </li>
            </ul>
        </li>
        <li>
            <a href="bootstrap-elements.html"><i class="fa fa-fw fa-desktop"></i> Bootstrap Elements</a>
        </li>
        <li>
            <a href="bootstrap-grid.html"><i class="fa fa-fw fa-wrench"></i> Bootstrap Grid</a>
        </li>
        <li>
            <a href="blank-page.html"><i class="fa fa-fw fa-file"></i> Blank Page</a>
        </li>
        <li>
            <a href="index-rtl.html"><i class="fa fa-fw fa-dashboard"></i> RTL Dashboard</a>
        </li>
    </ul>
</div>
<!-- /.navbar-collapse -->


<!-- wrapper main container -->
<div id="wrapper">
    <!-- Page Heading -->
    <!-- 项目说明 -->
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">
                招聘  <small>招聘展示方式示例</small>
            </h1>
            <!-- 分页暂时不使用
            <ol class="breadcrumb">
                <li class="active">
                    <i class="fa fa-dashboard"></i> Dashboard
                </li>
            </ol>
            -->
        </div>
        <div class="col-lg-12">

        </div>
    </div>
    <div class="row chart">
        <div class="col-lg-12 visible-panel">
            <div class="panel panel-default">
                <div class="panel-heading">公司列表选择</div>
                <div class="panel-body">
                    <select class="selector" name="companyList">

                    </select>
                    <p class="chart-btn"><a href="#" class="btn btn-primary chart-btn" role="button" data-toggle="modal" data-target="#myModal1">招聘原始数据</a></p>
                    <!-- Modal -->
                    <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                        <div class="modal-dialog" role="document">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" id="myModalLabel1">图表代码</h4>
                                </div>
                                <div class="modal-body">

                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
                                    <button type="button" class="btn btn-default">提交</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- End Modal -->
                </div>
            </div>





        </div>
    </div>
    <!-- /.row -->

</div>
<!-- end wrapper -->

<!-- js part-->
<!-- *******************************************-->
<!-- jQuery -->
<script src="js/jquery.js"></script>

<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>

<!-- Chart javascript :eChart -->
<script src="js/echarts.min.js"></script>

<!-- Morris Charts JavaScript -->
<!--<script src="js/plugins/morris/raphael.min.js"></script>-->
<!--<script src="js/plugins/morris/morris.min.js"></script>-->
<!--<script src="js/plugins/morris/morris-data.js"></script>-->
<!-- ********************************************-->

<script type="text/javascript">
    $(window).load(function() {
        $.ajax({
            url: "http://localhost:8000/query/companyList",    //后台webservice里的方法名称
            type: "get",
            dataType: "jsonp",
            contentType: "application/json",
            callback:"Jquery",
//            traditional: true,
            Origin:"http://localhost",
//            Content-Type:"text/html; charset=UTF-8",
//            Access-Control-Allow-Origin:'http://localhost',
//            Access-Control-Allow-Methods: 'GET,POST,OPTIONS',
//            Access-Control-Allow-Headers: 'X-Requested-With, Content-Type',
            success: function (data) {
//                console.log(data)
                optionstring = ""
                for (var i in data) {
                    var jsonObj =data[i];
//                    optionstring += "<option value=\"" + jsonObj.id + "\" >" + jsonObj.company_name + "</option>";
                    $('select[name="companyList"]').append("<option value=\"" + jsonObj.id + "\" >" + jsonObj.company_name + "</option>")
                }
                console.log(optionstring)
//                $("#companyList").("<option value='请选择'>请选择...</option>"+optionstring);
            },
            error: function (msg) {
                alert("出错了！");
            }
        });
    });

    $('select[name="companyList"]').change(function(){


    });
</script>



</body>
